﻿using System.Diagnostics.Contracts;
using System.Reactive.Concurrency;

namespace System.Reactive.Disposables
{
	public sealed class ScheduledDisposable
	{
		public IDisposable Disposable
		{
			get
			{
				Contract.Ensures(Contract.Result<IDisposable>() != null, null, "Contract.Result<IDisposable>() != null");
				return null;
			}
		}

		public IScheduler Scheduler
		{
			get
			{
				Contract.Ensures(Contract.Result<IScheduler>() != null, null, "Contract.Result<IScheduler>() != null");
				return null;
			}
		}

		public ScheduledDisposable(IScheduler scheduler, IDisposable disposable)
		{
			Contract.Requires(scheduler != null, null, "scheduler != null");
			Contract.Requires(disposable != null, null, "disposable != null");
			Contract.Ensures(object.ReferenceEquals(this.Scheduler, scheduler), null, "object.ReferenceEquals(this.Scheduler, scheduler)");
			Contract.Ensures(object.ReferenceEquals(this.Disposable, disposable), null, "object.ReferenceEquals(this.Disposable, disposable)");
		}
	}
}